import { atMessage } from '@tarojs/taro';

export function success(infor: string) {
  console.log(infor);
  return atMessage({
    type: 'success',
    message: infor,
  });
}

export function errorMsg(infor: string) {
  console.error(infor);
  return atMessage({
    type: 'error',
    message: infor,
  });
}

export function info(infor: string) {
  console.info(infor);
  return atMessage({
    type: 'info',
    message: infor,
  });
}

export function warning(infor: string) {
  console.warn(infor);
  return atMessage({
    type: 'warning',
    message: infor,
  });
}
